package com.xpgk.mvc.statistic.dlStatistic;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

import com.xpgk.mvc.base.BaseController;
import com.xpgk.mvc.statistic.yearTotalStatistic.YearTotal;
import com.xpgk.tools.ToolDateTime;

public class DlYearTotalStatisticController  extends  BaseController{
	
	public  void  index()
	{	
		String organids  = getCUserOrganIds();
		String year = ToolDateTime.format(new Date(), ToolDateTime.pattern_y);
		setAttr("organids", organids);
		setAttr("year", year);
		render("dlYearTotalStatistic.html");
	}
	
	
	
	public void getYearTotal() throws ParseException
	{
		/*String yearStr = (String) splitPage.getQueryParam().get("date");
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy");
		Date year = sdf.parse(yearStr);
		Calendar cal=Calendar.getInstance();
		cal.setTime(year);
		cal.add(Calendar.YEAR,-1);
		String lastYearStr = sdf.format(cal.getTime());
		splitPage.getQueryParam().put("lastYear",lastYearStr);*/
		String json = paging(splitPage,YearTotal.sqlId_splitPageSelect,YearTotal.sqlId_splitPageFrom);
		renderJson(json);
	}
}
